//
//  UserInfoModel.h
//  Assembly
//
//  Created by 葛悦彣 on 2023/11/23.
//

#import <Foundation/Foundation.h>
#import <YYCache/YYCache.h>

NS_ASSUME_NONNULL_BEGIN
@class UserInfoRolesModel,UserInfoDeModel;
@interface UserInfoModel : NSObject

+ (instancetype)shared;

@property (strong, atomic, readonly) YYCache *accountCache;

@property (nonatomic,strong)NSString * username;
@property (nonatomic,strong)NSString * realname;
@property (nonatomic,strong)NSString * phone;
@property (nonatomic,strong)NSString * token;
@property (nonatomic,strong)NSString * rolesStr;
@property (nonatomic,strong)NSString * OrgCode;
///1管理 3员工
@property (nonatomic,assign)int userIdentity;
@property (nonatomic,strong)NSString * userID;

@property (nonatomic,strong)NSArray <UserInfoRolesModel *> * roles;
@property (nonatomic,strong)UserInfoDeModel * userInfo;

///移除数据
+(BOOL)deleteAccount;
+ (NSString *)KeyForGS:(NSString *)str;//获取到的KEY不区分属性的大小写
@end

@interface UserInfoRolesModel : NSObject
@property (nonatomic,strong)NSString * createBy;
@property (nonatomic,strong)NSString * createTime;
@property (nonatomic,strong)NSString * Description;
@property (nonatomic,strong)NSString * ID;
@property (nonatomic,strong)NSString * roleCode;
@property (nonatomic,strong)NSString * roleName;
@property (nonatomic,strong)NSString * updateBy;
@property (nonatomic,strong)NSString * updateTime;
@property (nonatomic,assign)NSInteger tenantId;

@end
@interface UserInfoDeModel : NSObject

@property (nonatomic,strong)NSString * ID;
@property (nonatomic,strong)NSString * roleCode;
@property (nonatomic,strong)NSString * roleName;
@property (nonatomic,strong)NSString * appOrgCode;
@property (nonatomic,assign)int userIdentity;

@end
NS_ASSUME_NONNULL_END
